package com.betterman.controller;

import com.betterman.depend.idworker.Sid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * 测试类
 *
 * @author <a href="mailto:foxfocus@163.com">fox</a>
 * @version 9:52 下午 2020/8/5
 */
@RestController
@ApiIgnore  // 测试服务不暴露给接口文档
public class HelloController extends BaseController {

    @Autowired
    private Sid sid;
    @GetMapping("/hello")
    public Object hello() {
        return "hello";
    }

    @GetMapping("/id")
    public Object set() {
        return sid.nextShort();
    }

    @GetMapping("/get")
    public Object get() {
        return "redis";
    }
}
